//
//  ViewController.m
//  OC_Underlying_KVO
//
//  Created by jianbo.pei on 2024/1/24.
//

#import "ViewController.h"
#import "Person.h"

@interface ViewController ()

@property (nonatomic, strong) Person *person;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = UIColor.redColor;
    
    [self test1];
    
}

- (void)test1
{
    self.person = [[Person alloc] init];
    NSLog(@"11");

    [self.person addObserver:self forKeyPath:NSStringFromSelector(@selector(nickname)) options:(NSKeyValueObservingOptionNew) context:nil];
    NSLog(@"22");
}

@end
